﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.HeaderControl"
    CodeBehind="Header.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="CurrencySelector" Src="~/Modules/CurrencySelector.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="LanguageSelector" Src="~/Modules/LanguageSelector.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="TaxDisplayTypeSelector" Src="~/Modules/TaxDisplayTypeSelector.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="Banner" Src="~/Modules/Banner.ascx" %>

<div class="header-wrapper">
  <div class="header-logo">
    <a href="<%=CommonHelper.GetStoreLocation()%>" class="logo">&nbsp; </a>
  </div>
  <div class="header">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
      <tr>
        <td width="550px" align="center" rowspan="2">
          <nopCommerce:Banner ID="ctrlBanner" runat="server" CssImageClass="top-banner-logo" />
        </td>
        <td>
                <%if (this.ShoppingCartService.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart).TotalProducts > 0)
                { %>
                <div class="header-links-wrapper-green">
                <%} 
                else 
                {%>
                <div class="header-links-wrapper-blue">
                <%}%>
                  <div class="header-links">
                      <ul>
                          <li>
                            <a href="<%= SEOHelper.GetShoppingCartUrl()%>" class="ico-cart"><%=GetLocaleResourceString("Account.ShoppingCart")%></a>
                            <a href="<%= SEOHelper.GetShoppingCartUrl()%>">(<%=this.ShoppingCartService.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart).Count%>)</a>
                          </li>
                          <li>|
                          </li>
                          <asp:LoginView ID="topLoginView" runat="server">
                              <AnonymousTemplate>
                                  <li><a href="<%=Page.ResolveUrl("~/register.aspx")%>" class="ico-register">
                                      <%=GetLocaleResourceString("Account.Register")%></a></li>
                                  <li>|
                                  </li>
                                  <li><a href="<%=Page.ResolveUrl("~/login.aspx")%>" class="ico-login">
                                      <%=GetLocaleResourceString("Account.Login")%></a></li>
                              </AnonymousTemplate>
                                                                                                                                                                                                                              <LoggedInTemplate>
                          <li>
                              <a href="<%= SEOHelper.GetMyAccountUrl()%>" class="account">Личный кабинет</a>
                              <% if (NopContext.Current.IsCurrentCustomerImpersonated)
                                 { 
                              %>
                              <span class="impersonate">(<%=string.Format(GetLocaleResourceString("Account.ImpersonatedAs"), this.CustomerService.UsernamesEnabled ? Server.HtmlEncode(NopContext.Current.User.Username) : Server.HtmlEncode(NopContext.Current.User.Email))%>
                                  -
                                  <asp:LinkButton runat="server" ID="lFinishImpersonate" Text="<% $NopResources:Account.ImpersonatedAs.Finish %>"
                                      ToolTip="<% $NopResources:Account.ImpersonatedAs.Finish.Tooltip %>" OnClick="lFinishImpersonate_Click"
                                      CssClass="finish-impersonation"></asp:LinkButton>)</span>
                              <%} %>
                          </li>
                          <li>|
                          </li>
                          <li><a href="<%=Page.ResolveUrl("~/logout.aspx")%>" class="ico-logout">
                              <%=GetLocaleResourceString("Account.Logout")%></a> </li>
                          <% if (this.ForumService.AllowPrivateMessages)
                             { %>
                          <li><a href="<%=Page.ResolveUrl("~/privatemessages.aspx")%>" class="ico-inbox">
                              <%=GetLocaleResourceString("PrivateMessages.Inbox")%></a>
                              <asp:Literal runat="server" ID="lUnreadPrivateMessages" />
                          </li>
                          <%} %>
                      </LoggedInTemplate>
                          </asp:LoginView>
                          <%--<li style="font-size: 13px; color: #003C77; padding-left: 0px; font-weight: bold; padding-top: 10px; line-height: 20px; text-align:right;">
                            <br /><%=GetLocaleResourceString("Alesko.OwnerParameters.PhoneString")%>
                
                          </li>--%>
                
                          <%--
                          <% if (this.SettingManager.GetSettingValueBoolean("Common.EnableWishlist"))
                             { %>
                          <li><a href="<%= SEOHelper.GetWishlistUrl()%>" class="ico-wishlist">
                              <%=GetLocaleResourceString("Wishlist.Wishlist")%></a> <a href="<%= SEOHelper.GetWishlistUrl()%>">
                                  (<%=this.ShoppingCartService.GetCurrentShoppingCart(ShoppingCartTypeEnum.Wishlist).TotalProducts%>)</a></li>
                          <%} %>
                

                          <% if (NopContext.Current.User != null && NopContext.Current.User.IsAdmin)
                             { %>
                          <li><a href="<%=Page.ResolveUrl("~/administration/")%>" class="ico-admin">
                              <%=GetLocaleResourceString("Account.Administration")%></a> </li>
                          <%} %>
                          --%>
                      </ul>
                  </div>
              </div>
              <div class="header-place-order">
                    <%if (this.ShoppingCartService.GetCurrentShoppingCart(ShoppingCartTypeEnum.ShoppingCart).TotalProducts > 0)
                    { %>
                      <asp:Button ID="btnCheckout" OnClick="btnCheckout_Click" runat="server" Text="" CssClass="placeorderbutton" />
                    <%} %>
              </div>
              <div class="header-selectors-wrapper">
                  <div class="header-taxDisplayTypeSelector">
                      <nopCommerce:TaxDisplayTypeSelector runat="server" ID="ctrlTaxDisplayTypeSelector">
                      </nopCommerce:TaxDisplayTypeSelector>
                  </div>
                  <div class="header-currencyselector">
                      <nopCommerce:CurrencySelector runat="server" ID="ctrlCurrencySelector"></nopCommerce:CurrencySelector>
                  </div>
                  <div class="header-languageselector">
                      <nopCommerce:LanguageSelector runat="server" ID="ctrlLanguageSelector"></nopCommerce:LanguageSelector>
                  </div>
              </div>
        </td>
      </tr>
      <tr>
        <td align="right" style="font-size: 13px; color: #003C77; padding-left: 0px; font-weight: bold; line-height: 20px; text-align:right; height:40px;">
          <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
              <td>
                <%=GetLocaleResourceString("Alesko.OwnerParameters.PhonePrefix")%>
                <%=GetLocaleResourceString("Alesko.OwnerParameters.PhoneString1")%>
              </td>
            </tr>
            <tr>
              <td>
                <%=GetLocaleResourceString("Alesko.OwnerParameters.PhoneString2")%>
              </td>
            </tr>
          </table>
          
        </td>
      </tr>
      </table>
  </div>

</div>
